#!/bin/bash
function sync_code()
{
	git pull
	git submodule update --init --recursive
}
function ctags_to_file()
{
	ctags --file-scope=yes --langmap=c:+.h --languages=c,c++ --links=yes --c-kinds=+p --c++-kinds=+p --fields=+iaS --extra=+q  -f ./tags -R . /usr/include/ /usr/local/include/
}
function no_function()
{
	echo "no function"
}

echo "vim plugin install "

if [ $# != 1 ] ; then
	echo "USAGE PARAM : $0 ins | tag"
	exit 1;
fi 


if [ $1 == "tags" ];
	then
	ctags_to_file
elif  [ $1 == "tag" ]; 
	then
	ctags_to_file
elif  [ $1 == "sync" ]; 
	then
	sync_code
else
	no_function
fi




